
public class TetsInheritance {
	public static void main(String[] args) {
		
		Child child = new Child(2);
		child.testname();
		
		child = new Child(4);
		
		
		Parent parent = new Parent(2);
		parent.testname();
		Parent p = new Child(2);
//		/p.print123();
		p.testname();
		
		parent = child;
//		parent = null;
		
		child  = (Child) parent;
		
		GrandParent grandParent = new GrandParent();
		child = (Child) grandParent;
		grandParent = child;
		
	}
}
